using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class physique_checkMap : EntityTypeConfiguration<physique_check>
    {
        public physique_checkMap()
        {
            // Primary Key
            this.HasKey(t => new { t.physique_check_id, t.patient_id });

            // Properties
            this.Property(t => t.physique_check_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.patient_id)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.cardiac_examination_see)
                .HasMaxLength(200);

            this.Property(t => t.cardiac_examination_touch)
                .HasMaxLength(200);

            this.Property(t => t.cardiac_examination_Knock)
                .HasMaxLength(200);

            this.Property(t => t.cardiac_examination_listen)
                .HasMaxLength(200);

            this.Property(t => t.Pulmonary_rales)
                .HasMaxLength(50);

            this.Property(t => t.HeartRhythm)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("physique_check");
            this.Property(t => t.physique_check_id).HasColumnName("physique_check_id");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.morning_SBP).HasColumnName("morning_SBP");
            this.Property(t => t.morning_DBP).HasColumnName("morning_DBP");
            this.Property(t => t.noon_SBP).HasColumnName("noon_SBP");
            this.Property(t => t.noon_DBP).HasColumnName("noon_DBP");
            this.Property(t => t.night_SBP).HasColumnName("night_SBP");
            this.Property(t => t.night_DBP).HasColumnName("night_DBP");
            this.Property(t => t.limbs_left_up_SBP).HasColumnName("limbs_left_up_SBP");
            this.Property(t => t.limbs_left_up_DBP).HasColumnName("limbs_left_up_DBP");
            this.Property(t => t.limbs_right_up_SBP).HasColumnName("limbs_right_up_SBP");
            this.Property(t => t.limbs_right_up_DBP).HasColumnName("limbs_right_up_DBP");
            this.Property(t => t.limbs_left_down_SBP).HasColumnName("limbs_left_down_SBP");
            this.Property(t => t.limbs_left_down_DBP).HasColumnName("limbs_left_down_DBP");
            this.Property(t => t.limbs_right_down_SBP).HasColumnName("limbs_right_down_SBP");
            this.Property(t => t.limbs_right_down_DBP).HasColumnName("limbs_right_down_DBP");
            this.Property(t => t.cardiac_examination_see).HasColumnName("cardiac_examination_see");
            this.Property(t => t.cardiac_examination_touch).HasColumnName("cardiac_examination_touch");
            this.Property(t => t.cardiac_examination_Knock).HasColumnName("cardiac_examination_Knock");
            this.Property(t => t.cardiac_examination_listen).HasColumnName("cardiac_examination_listen");
            this.Property(t => t.Heart_rate).HasColumnName("Heart_rate");
            this.Property(t => t.Pulmonary_rales).HasColumnName("Pulmonary_rales");
            this.Property(t => t.HeartRhythm).HasColumnName("HeartRhythm");
        }
    }
}
